// pages/cart/submitOrder/success/success.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    type: true,
    goodsId: '',
    orderId: '',
    goodsType: '',
    orderNo: '',
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.setData({
      goodsId: options.goodsId,
      orderId: options.orderId,
      goodsType: options.goodsType,
      orderNo: options.orderNo,
    })
    if (options.goodsType == 1) {
      this.setData({
        type: false
      })
    }
  },



  //去往点单页面
  toMallPage() {
    wx.redirectTo({
      url: '/pages/Mall/Mall',
    })
  },
  //查看详情
  toDetailPage() {
    wx.navigateTo({
      url: '/pages/my/productOrder-detail/productOrder-detail?id=' + this.data.orderNo,
    })
  },

  //跳转预约页面
  order() {
    let goodsid = this.data.goodsId;
    let orderId = this.data.orderId;
    let orderNo = this.data.orderNo;
    wx.navigateTo({
      url: '/pages/Index/Service?goodsid=' + goodsid + '&orderId=' + orderId + '&orderNo=' + orderNo,
    })
  }
})